<template>
	<view>
		<view class="m-banner">
			<u-swiper height="500" border-radius="0" mode="number" indicator-pos="bottomLeft"
				:list="info.images"></u-swiper>
		</view>
		<view class="m-title">
			<text>{{info.title}}</text>
		</view>
		<view class="m-icon-list" v-if="info.equipments.length > 0">
			<view class="m-icon-item" v-for="(item,index) in info.equipments[0].child">
				<image :src="item.backimg" mode=""></image>
				<view class="">
					<text>{{item.title}}</text>
				</view>
			</view>
		</view>
		
		<block v-for="(item,index) in info.equipments" :key="index">
			<block v-if="index >0">
				<view class="m-title">
					<text>{{item.title}}</text>
				</view>
				<view class="m-list">
					<view class="m-item" v-for="(val,key) in item.child" :key="index">
						<image src="@/static/index/icon-dui.png" mode=""></image>
						<text>{{val.title}}</text>
					</view>
				</view>
			</block>
		</block>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info:{
					images:[],
					equipments:[]
				},
			}
		},
		onLoad(opt) {
			this.getDetailFun(opt.id)
		},
		methods: {
			getDetailFun(id){
				this.$http.getJson('hotal_roomDetail',{id}).then(res=>{
					if(res.code == 1){
						this.info = res.data
					}else{
						this.$m.msg(res.message,()=>{
							this.to_back()
						})
					}
				})
			}
		}
	}
</script>

<style lang="scss">
.m-title{
	padding: 30rpx 25rpx ;
	font-size: 34rpx;
	color: #33302D;
	font-weight: 600;
}
.m-icon-list{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	width: 700rpx;
	margin-left: 25rpx;
	border-bottom: 1px solid #E6E2DE;
	.m-icon-item{
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		font-size: 26rpx;
		color: #33302D;
		width: 20%;
		padding: 30rpx 0;
		image{
			width: 48rpx;
			height: 48rpx;
			margin-top: 10rpx;
		}
	}
}

.m-list{
	display: flex;
	flex-wrap: wrap;
	padding: 0 25rpx;
	.m-item{
		display: flex;
		align-items: center;
		font-size: 24rpx;
		color: #33302D;
		line-height: 33rpx;
		width: 50%;
		padding-bottom: 20rpx;
		image{
			width: 30rpx;
			height: 30rpx;
			margin-right: 12rpx;
		}
	}
}
</style>
